<?php

namespace common\traits\relation;

/**
 * Description of Constants
 *
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
trait UserData {

    /**
     * 用户基本信息
     * @return user
     */
    public function getUser() {
        return $this->hasOne(\common\models\user\UserMeta::className(), ['id' => 'user_id']);
    }

    /**
     * 用户基本信息
     * @return user
     */
    public function getUserBase() {
        return $this->hasOne(\common\models\user\User::className(), ['id' => 'user_id']);
    }

}
